.class abstract Lcom/burstly/lib/service/AbstractHostProvider;
.super Ljava/lang/Object;
.source "AbstractHostProvider.java"

# interfaces
.implements Lcom/burstly/lib/service/IHostProvider;


# instance fields
.field private final mIpDownloader:Lcom/burstly/lib/service/IpDownloader;

.field private mLevelOneServers:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method protected constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .parameter "context"
    .parameter "fileName"
    .parameter "serverUri"

    .prologue
    .line 48
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 49
    invoke-virtual {p0}, Lcom/burstly/lib/service/AbstractHostProvider;->createLevelOneServers()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/burstly/lib/service/AbstractHostProvider;->mLevelOneServers:Ljava/util/List;

    .line 50
    new-instance v0, Lcom/burstly/lib/service/IpDownloader;

    invoke-direct {v0, p1, p2, p3, p0}, Lcom/burstly/lib/service/IpDownloader;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Lcom/burstly/lib/service/IHostProvider;)V

    iput-object v0, p0, Lcom/burstly/lib/service/AbstractHostProvider;->mIpDownloader:Lcom/burstly/lib/service/IpDownloader;

    .line 51
    return-void
.end method


# virtual methods
.method protected abstract createLevelOneServers()Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end method

.method public getLevelOneHosts()Ljava/util/List;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 62
    iget-object v0, p0, Lcom/burstly/lib/service/AbstractHostProvider;->mLevelOneServers:Ljava/util/List;

    invoke-virtual {p0}, Lcom/burstly/lib/service/AbstractHostProvider;->getPrimaryHost()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/burstly/lib/util/Utils;->shuffle(Ljava/util/List;Ljava/lang/String;)Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method public getLevelTwoHosts()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 67
    iget-object v0, p0, Lcom/burstly/lib/service/AbstractHostProvider;->mIpDownloader:Lcom/burstly/lib/service/IpDownloader;

    invoke-virtual {v0}, Lcom/burstly/lib/service/IpDownloader;->getIpList()Ljava/util/List;

    move-result-object v0

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->shuffle(Ljava/util/List;)Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method protected abstract getPrimaryHost()Ljava/lang/String;
.end method
